home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / rex.lha / rex / m2c / Tree0.h < prev   
C/C++ Source or Header  |  1992-08-18  |  6KB  |  240 lines

  1. #define DEFINITION_Tree0
  2.  
  3. #ifndef DEFINITION_IO
  4. #include "IO.h"
  5. #endif
  6.  
  7. #ifndef DEFINITION_Sets
  8. #include "Sets.h"
  9. #endif
  10.  
  11. #ifndef DEFINITION_Texts
  12. #include "Texts.h"
  13. #endif
  14.  
  15. #ifndef DEFINITION_StringMem
  16. #include "StringMem.h"
  17. #endif
  18.  
  19. #ifndef DEFINITION_Positions
  20. #include "Positions.h"
  21. #endif
  22.  
  23. #ifndef DEFINITION_Tree
  24. #include "Tree.h"
  25. #endif
  26.  
  27. #define Tree0_NoTree0    NIL
  28. #define Tree0_Node    1
  29. #define Tree0_Node1    2
  30. #define Tree0_Option    3
  31. #define Tree0_Repetition    4
  32. #define Tree0_Node2    5
  33. #define Tree0_List    6
  34. #define Tree0_Sequence    7
  35. #define Tree0_Alternative    8
  36. #define Tree0_Ch    9
  37. #define Tree0_Set    10
  38. #define Tree0_String    11
  39. #define Tree0_Rule    12
  40. #define Tree0_Pattern    13
  41. typedef struct Tree0_15 *Tree0_tTree0;
  42. typedef void (*Tree0_tProcTree) ARGS((Tree0_tTree0));
  43. typedef struct Tree0_1 {
  44.     SHORTCARD yyKind, yyMark;
  45. } Tree0_yytNodeHead;
  46. typedef struct Tree0_2 {
  47.     Tree0_yytNodeHead yyHead;
  48.     Tree_tTree Tree;
  49.     BOOLEAN IsConstantRE;
  50.     SHORTINT LeafCount;
  51.     SHORTINT NodeCount;
  52. } Tree0_yNode;
  53. typedef struct Tree0_3 {
  54.     Tree0_yytNodeHead yyHead;
  55.     Tree_tTree Tree;
  56.     BOOLEAN IsConstantRE;
  57.     SHORTINT LeafCount;
  58.     SHORTINT NodeCount;
  59.     Tree0_tTree0 Son1;
  60. } Tree0_yNode1;
  61. typedef struct Tree0_4 {
  62.     Tree0_yytNodeHead yyHead;
  63.     Tree_tTree Tree;
  64.     BOOLEAN IsConstantRE;
  65.     SHORTINT LeafCount;
  66.     SHORTINT NodeCount;
  67.     Tree0_tTree0 Son1;
  68. } Tree0_yOption;
  69. typedef struct Tree0_5 {
  70.     Tree0_yytNodeHead yyHead;
  71.     Tree_tTree Tree;
  72.     BOOLEAN IsConstantRE;
  73.     SHORTINT LeafCount;
  74.     SHORTINT NodeCount;
  75.     Tree0_tTree0 Son1;
  76. } Tree0_yRepetition;
  77. typedef struct Tree0_6 {
  78.     Tree0_yytNodeHead yyHead;
  79.     Tree_tTree Tree;
  80.     BOOLEAN IsConstantRE;
  81.     SHORTINT LeafCount;
  82.     SHORTINT NodeCount;
  83.     Tree0_tTree0 Son1;
  84.     Tree0_tTree0 Son2;
  85. } Tree0_yNode2;
  86. typedef struct Tree0_7 {
  87.     Tree0_yytNodeHead yyHead;
  88.     Tree_tTree Tree;
  89.     BOOLEAN IsConstantRE;
  90.     SHORTINT LeafCount;
  91.     SHORTINT NodeCount;
  92.     Tree0_tTree0 Son1;
  93.     Tree0_tTree0 Son2;
  94. } Tree0_yList;
  95. typedef struct Tree0_8 {
  96.     Tree0_yytNodeHead yyHead;
  97.     Tree_tTree Tree;
  98.     BOOLEAN IsConstantRE;
  99.     SHORTINT LeafCount;
  100.     SHORTINT NodeCount;
  101.     Tree0_tTree0 Son1;
  102.     Tree0_tTree0 Son2;
  103. } Tree0_ySequence;
  104. typedef struct Tree0_9 {
  105.     Tree0_yytNodeHead yyHead;
  106.     Tree_tTree Tree;
  107.     BOOLEAN IsConstantRE;
  108.     SHORTINT LeafCount;
  109.     SHORTINT NodeCount;
  110.     Tree0_tTree0 Son1;
  111.     Tree0_tTree0 Son2;
  112. } Tree0_yAlternative;
  113. typedef struct Tree0_10 {
  114.     Tree0_yytNodeHead yyHead;
  115.     Tree_tTree Tree;
  116.     BOOLEAN IsConstantRE;
  117.     SHORTINT LeafCount;
  118.     SHORTINT NodeCount;
  119.     CHAR Ch;
  120. } Tree0_yCh;
  121. typedef struct Tree0_11 {
  122.     Tree0_yytNodeHead yyHead;
  123.     Tree_tTree Tree;
  124.     BOOLEAN IsConstantRE;
  125.     SHORTINT LeafCount;
  126.     SHORTINT NodeCount;
  127.     Sets_tSet Set;
  128.     SHORTCARD card;
  129. } Tree0_ySet;
  130. typedef struct Tree0_12 {
  131.     Tree0_yytNodeHead yyHead;
  132.     Tree_tTree Tree;
  133.     BOOLEAN IsConstantRE;
  134.     SHORTINT LeafCount;
  135.     SHORTINT NodeCount;
  136.     StringMem_tStringRef String;
  137. } Tree0_yString;
  138. typedef struct Tree0_13 {
  139.     Tree0_yytNodeHead yyHead;
  140.     Tree_tTree Tree;
  141.     BOOLEAN IsConstantRE;
  142.     SHORTINT LeafCount;
  143.     SHORTINT NodeCount;
  144.     Tree0_tTree0 Patterns;
  145.     Texts_tText TargetCode;
  146.     SHORTCARD Line;
  147.     SHORTCARD CodeMode;
  148.     SHORTCARD RuleNr;
  149. } Tree0_yRule;
  150. typedef struct Tree0_14 {
  151.     Tree0_yytNodeHead yyHead;
  152.     Tree_tTree Tree;
  153.     BOOLEAN IsConstantRE;
  154.     SHORTINT LeafCount;
  155.     SHORTINT NodeCount;
  156.     Sets_tSet StartStates;
  157.     Tree0_tTree0 RegExpr;
  158.     Tree0_tTree0 RightContext;
  159.     SHORTCARD PatternNr;
  160.     Positions_tPosition Position;
  161.     SHORTINT card;
  162. } Tree0_yPattern;
  163. typedef struct Tree0_15 {
  164.     union {
  165.         struct {
  166.             SHORTCARD Kind;
  167.         } V_1;
  168.         struct {
  169.             Tree0_yytNodeHead yyHead;
  170.         } V_2;
  171.         struct {
  172.             Tree0_yNode Node;
  173.         } V_3;
  174.         struct {
  175.             Tree0_yNode1 Node1;
  176.         } V_4;
  177.         struct {
  178.             Tree0_yOption Option;
  179.         } V_5;
  180.         struct {
  181.             Tree0_yRepetition Repetition;
  182.         } V_6;
  183.         struct {
  184.             Tree0_yNode2 Node2;
  185.         } V_7;
  186.         struct {
  187.             Tree0_yList List;
  188.         } V_8;
  189.         struct {
  190.             Tree0_ySequence Sequence;
  191.         } V_9;
  192.         struct {
  193.             Tree0_yAlternative Alternative;
  194.         } V_10;
  195.         struct {
  196.             Tree0_yCh Ch;
  197.         } V_11;
  198.         struct {
  199.             Tree0_ySet Set;
  200.         } V_12;
  201.         struct {
  202.             Tree0_yString String;
  203.         } V_13;
  204.         struct {
  205.             Tree0_yRule Rule;
  206.         } V_14;
  207.         struct {
  208.             Tree0_yPattern Pattern;
  209.         } V_15;
  210.     } U_1;
  211. } Tree0_yyNode;
  212. extern Tree0_tTree0 Tree0_Tree0Root;
  213. extern LONGCARD Tree0_HeapUsed;
  214. extern ADDRESS Tree0_yyPoolFreePtr, Tree0_yyPoolMaxPtr;
  215. extern struct Tree0_16 {
  216.     SHORTCARD A[13 + 1];
  217. } Tree0_yyNodeSize;
  218. extern Tree0_tTree0 Tree0_yyAlloc ARGS(());
  219. extern Tree0_tTree0 Tree0_MakeTree0 ARGS((SHORTCARD Kind));
  220. extern BOOLEAN Tree0_IsType ARGS((Tree0_tTree0 Tree, SHORTCARD Kind));
  221. extern Tree0_tTree0 Tree0_mNode ARGS(());
  222. extern Tree0_tTree0 Tree0_mNode1 ARGS((Tree0_tTree0 pSon1));
  223. extern Tree0_tTree0 Tree0_mOption ARGS((Tree0_tTree0 pSon1));
  224. extern Tree0_tTree0 Tree0_mRepetition ARGS((Tree0_tTree0 pSon1));
  225. extern Tree0_tTree0 Tree0_mNode2 ARGS((Tree0_tTree0 pSon1, Tree0_tTree0 pSon2));
  226. extern Tree0_tTree0 Tree0_mList ARGS((Tree0_tTree0 pSon1, Tree0_tTree0 pSon2));
  227. extern Tree0_tTree0 Tree0_mSequence ARGS((Tree0_tTree0 pSon1, Tree0_tTree0 pSon2));
  228. extern Tree0_tTree0 Tree0_mAlternative ARGS((Tree0_tTree0 pSon1, Tree0_tTree0 pSon2));
  229. extern Tree0_tTree0 Tree0_mCh ARGS((CHAR pCh));
  230. extern Tree0_tTree0 Tree0_mSet ARGS((Sets_tSet pSet));
  231. extern Tree0_tTree0 Tree0_mString ARGS((StringMem_tStringRef pString));
  232. extern Tree0_tTree0 Tree0_mRule ARGS((Tree0_tTree0 pPatterns, Texts_tText pTargetCode, SHORTCARD pLine, SHORTCARD pCodeMode, SHORTCARD pRuleNr));
  233. extern Tree0_tTree0 Tree0_mPattern ARGS((Sets_tSet pStartStates, Tree0_tTree0 pRegExpr, Tree0_tTree0 pRightContext, SHORTCARD pPatternNr, Positions_tPosition pPosition));
  234. extern void Tree0_ReleaseTree0Module ARGS(());
  235. extern void Tree0_WriteTree0 ARGS((IO_tFile f, Tree0_tTree0 Tree));
  236. extern void Tree0_TraverseTree0TD ARGS((Tree0_tTree0 Tree, Tree0_tProcTree Proc));
  237. extern void Tree0_BeginTree0 ARGS(());
  238. extern void Tree0_CloseTree0 ARGS(());
  239. extern void BEGIN_Tree0();
  240.